/******************************************************************************

	COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2010.

	This file is part of the Maxsi Library.

	Maxsi Library is free software: you can redistribute it and/or modify it
	under the terms of the GNU Lesser General Public License as published by
	the Free Software Foundation, either version 3 of the License, or (at your
	option) any later version.

	Maxsi Library is distributed in the hope that it will be useful, but
	WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
	or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
	License for more details.

	You should have received a copy of the GNU Lesser General Public License
	along with Maxsi Library. If not, see <http://www.gnu.org/licenses/>.

	Maxsi Library
	A powerful Cross-Platform C++ General Purpose Library that allows you to
	efficiently create high-performance and reliable applications.

	MaxsiCRuntime.h
	Turns out MinGW/GCC doesn't support as much useful stuff as Microsoft, so
	we have to implement it ourselves!

******************************************************************************/

#ifndef MaxsiCRuntime_H
#define MaxsiCRuntime_H

#ifdef Maxsi_Support_C_Runtime_Extensions

//=============================================================================
//	Type declarations
//=============================================================================
typedef int errno_t;

BeginMaxsiNamespace

//=============================================================================
//	C Runtime extensions for MinGW
//=============================================================================
MAXSI_LINK int strcat_s(char* strDestination, size_t numberOfElements, const char* strSource);
MAXSI_LINK int wcscat_s(wchar_t* strDestination, size_t numberOfElements, const wchar_t* strSource);

MAXSI_LINK int strcpy_s(char* strDestination, size_t numberOfElements, const char* strSource);
MAXSI_LINK int wcscpy_s(wchar_t* strDestination, size_t numberOfElements, const wchar_t* strSource);

//MAXSI_LINK errno_t	asctime_s(char* buffer, size_t numberOfElements, const struct tm *_tm);
MAXSI_LINK errno_t _get_errno(int * _Value);

EndMaxsiNamespace

#endif

#endif
